﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using QT.Windows.Shell;

namespace IISLogAnalytics
{
    public partial class DataManager : GlassForm
    {
        public DataManager()
        {
            InitializeComponent();
        }

        private void gbtnMove_Click(object sender, EventArgs e)
        {
            if (DBO.MoveRecord(this.dtpMove.Value.ToString("yyyy-MM-dd")) == -1)
            {
                MessageBox.Show("操作失败");
            }
            else
            {
                MessageBox.Show("操作成功");
            }
        }

        private void gbtnDelete_Click(object sender, EventArgs e)
        {
            if (DBO.DeleteRecord(this.dtpDelete.Value.ToString("yyyy-MM-dd")) == -1)
            {
                MessageBox.Show("操作失败");
            }
            else
            {
                MessageBox.Show("操作成功");
            }
        }

        private void gbtnMultiDelete_Click(object sender, EventArgs e)
        {
            if (DBO.DeleteMultiRecord(this.dtpMultiDelStart.Value.ToString("yyyy-MM-dd"),this.dtpMultiDelEnd.Value.ToString("yyyy-MM-dd")) == -1)
            {
                MessageBox.Show("操作失败");
            }
            else
            {
                MessageBox.Show("操作成功");
            }
        }
    }
}
